const { DataTypes } = require('sequelize')
const seq = require('../db/seq')
const Order = seq.define('order', {
    user_id: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    address_id: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    goods_info: {
        type: DataTypes.STRING,
        allowNull: false
    },
    total: {
        type: DataTypes.STRING,
        allowNull: false
    },
    order_number: {
        type: DataTypes.STRING,
        allowNull: false
    },
    status: {
        type: DataTypes.TINYINT,
        allowNull: false,
        defaultValue: 0
    }
})

// Order.sync({ force: true })
module.exports = Order